/**
 * 
 */
package com.gr.experimental.model.impl;

import java.util.List;

import com.gr.experimental.model.Node;
import com.gr.experimental.model.RVArgument;
import com.gr.experimental.model.RVClass;

/**
 * @author Karol Banczyk
 *
 */
class NodeImpl implements Node {

	private RVClass rvClass;
	private List<? extends RVArgument> arguments;
	
	/**
	 * @param rvClass
	 * @param arguments
	 */
	public NodeImpl(RVClass rvClass, List<? extends RVArgument> arguments) {
		super();
		this.rvClass = rvClass;
		if (rvClass.getArgumentCount() != arguments.size()) {
			throw new IllegalArgumentException("arguments.size != rvClass.argumentCount");
		}
		this.arguments = arguments;
	}

	/**
	 * {@inheritDoc}
	 * @see com.gr.experimental.model.Node#getArguments()
	 */
	@Override
	public List<? extends RVArgument> getArguments() {
		return arguments;
	}

	/**
	 * {@inheritDoc}
	 * @see com.gr.experimental.model.Node#getRVClass()
	 */
	@Override
	public RVClass getRVClass() {
		return rvClass;
	}

}
